package com.woniuxy.purchasemanager.controller;

import com.woniuxy.purchasemanager.service.NeedAllocationFileService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;

/**
 * @ClassName NeedAllocationController
 * @Description 分配需求单控制器
 * @Author xianhao
 * @Date 2022/4/21 14:31
 * @Version 1.0.0
 */
@RestController
@RequestMapping("/file")
public class NeedAllocationFileController {

    @Resource
    private NeedAllocationFileService needAllocationFileService;

    @GetMapping("/needAllocation/export")
    public String exportDataToExcel(HttpServletResponse response){
        needAllocationFileService.exportDataToExcel(response);
        return "导出成功！";
    }
}
